<!-- include a-frame -->
<script src='vendor/aframe/build/aframe.min.js'></script>

<script src="https://unpkg.com/aframe-text-geometry-component@0.5.1/dist/aframe-text-geometry-component.min.js"></script>
<!-- include ar.js for aframe -->
<script src='../build/aframe-ar.js'></script>
<script>ARjs.Context.baseURL = '../../three.js/'</script>

<!-- start the body of your page -->
<body style='margin : 0px; overflow: hidden;'>
	<!-- add some info at the top of the page -->
	<div style='position: fixed; top: 10px; width:100%; text-align: center; z-index: 1;'>
		<a href='https://github.com/jeromeetienne/AR.js/' target='_blank'>AR.js</a> - tango example for a-frame by <a href='https://twitter.com/jerome_etienne' target='_blank'>@jerome_etienne</a>
	</div>
	
	<!-- Define your 3d scene and enabled ar.js -->
	<a-scene embedded arjs='trackingMethod: best;'>
		
		<a-assets>
			<img id="pink" src="https://img.gs/bbdkhfbzkk/stretch/http://i.imgur.com/1hyyIUi.jpg" crossorigin="anonymous" />
			<img src="https://img.gs/bbdkhfbzkk/stretch/https://i.imgur.com/25P1geh.png" id="grid" crossorigin="anonymous">
			<img src="https://img.gs/bbdkhfbzkk/2048x1024,stretch/http://i.imgur.com/WMNH2OF.jpg" id="chrome" crossorigin="anonymous">
			<img id="sky" src="https://img.gs/bbdkhfbzkk/2048x2048,stretch/http://i.imgur.com/WqlqEkq.jpg" crossorigin="anonymous" />
			<a-asset-item id="dawningFont" src="https://cdn.glitch.com/c719c986-c0c5-48b8-967c-3cd8b8aa17f3%2FdawningOfANewDayRegular.typeface.json?1490305922844"></a-asset-item>
			<a-asset-item id="exoFont" src="https://cdn.glitch.com/c719c986-c0c5-48b8-967c-3cd8b8aa17f3%2Fexo2Black.typeface.json?1490305922150"></a-asset-item>
			<a-asset-item id="exoItalicFont" src="https://cdn.glitch.com/c719c986-c0c5-48b8-967c-3cd8b8aa17f3%2Fexo2BlackItalic.typeface.json?1490305922725"></a-asset-item>
		</a-assets>		
		<!-- Create a anchor to attach your augmented reality -->
		<a-anchor hit-testing-enabled='true'>
			
			<a-entity scale='0.3 0.3 0.3'>
				
				<a-entity scale="2 2 2" geometry="primitive: torusKnot" position="0 6 -10" material="color: magenta; metalness:1; roughness: 0.1; sphericalEnvMap: #sky;">
					<a-animation easing="linear" attribute="rotation" dur="10000" to="0 0 360" repeat="indefinite"></a-animation>
				</a-entity>
				
				<a-entity position="-3 1 -6" rotation="5 0 0">
					<a-entity
					rotation="0 0 5"
					position="0 2 0.2"
					text-geometry="value: Virtual Reality; font: #dawningFont; bevelEnabled: true; bevelSize: 0.05; bevelThickness: 0.05; curveSegments: 12; size: 1; height: 0;"
					material="color:lavenderblush; metalness:1; roughness: 0; sphericalEnvMap: #pink;"
					>
				</a-entity>
				
				<a-entity position="-0.5 0.5 -0.5" scale="0.6 1.2 1" text-geometry="value: VAPORWAVE; font: #exoFont; bevelEnabled: true; bevelSize: 0.1; bevelThickness: 0.1; curveSegments: 1; size: 1.5; height: 0.5;" material="color:pink; metalness:0.9; roughness: 0.05; sphericalEnvMap: #chrome;">
				</a-entity>
				
				<a-entity position="1 0 0.3" text-geometry="value: Aesthetic; font: #exoItalicFont; style: italic; size: 0.8; weight: bold; height: 0;"
				material="shader: flat; color: white"></a-entity>
				<a-entity position="1 0 0.3" text-geometry="value: Aesthetic; font: #exoItalicFont; style: italic; size: 0.8; weight: bold; height: 0; bevelEnabled: true; bevelSize: 0.04; bevelThickness: 0.04; curveSegments: 1"
				material="shader: flat; color: white; transparent: true; opacity: 0.4"></a-entity>
			</a-entity>
			
			<a-entity geometry="primitive: plane; width: 10000; height: 10000;" rotation="-90 0 0" material="src: #grid; repeat: 10000 10000; transparent: true;metalness:0.6; roughness: 0.4; sphericalEnvMap: #sky;">
			</a-entity>
			
			<a-entity light="color: #ccccff; intensity: 1; type: ambient;" visible=""></a-entity>
			<a-entity light="color: ffaaff; intensity: 1.5" position="5 5 5"></a-entity>
			<a-entity light="color: white; intensity: 0.5" position="-5 5 15"></a-entity>
			<a-entity light="color: white; type: ambient;"></a-entity>
			
			<a-sky src="#sky" rotation="0 -90 0" radius='50'></a-sky>
		</a-entity>
	</a-anchor>
	
	<!-- Define a static camera -->
	<a-camera-static/>
	
</a-scene>
</body>
